package com.example.techstudy.controller;

import com.example.techstudy.service.MtTaskService;
import com.example.techstudy.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: ls
 * @date: 2022/4/8
 * @description:
 */
@RestController
@RequestMapping("/student")
public class StudentController {

    @Resource
    private StudentService studentService;

    @Resource
    private MtTaskService taskService;

    @GetMapping("/test")
    public void test(){
        studentService.test1();
    }

    @GetMapping("/test-trans")
    public void testTransaction(){
        studentService.testTrans();
    }

    @GetMapping("/test-non-trans")
    public void testNonTransaction(){
        studentService.testNonTrans();
    }

    @GetMapping("/test-task")
    public void test1(){
        taskService.test();
    }
}
